package com.qidianit.mes.pro.controller;

import com.qidianit.mes.pojo.Result;
import com.qidianit.mes.pojo.scheduling.ProductionTask;
import com.qidianit.mes.pro.service.ProductionTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: YKYB
 * @Date: 2025/9/30 15:26
 * @Description:
 */
@RestController
@RequestMapping("/productionTask")
public class ProductionTaskController {

    @Autowired
    private ProductionTaskService productionTaskService;

    @GetMapping("/list/{workflowId}")
    public Result<List<ProductionTask>> list(@PathVariable Long workflowId) {
        return productionTaskService.getScheduledTasksByWorkflowId(workflowId);
    }

}
